using Services;
using UnityEngine;

[RequireComponent(typeof(GridTransform))]
public class Surface : MonoBehaviour, IGridTransform
{
    private ActionController actionController;
    private GridTransform gridTransform;
    public GridTransform GridTransform => gridTransform;

    public float difficulty_move = 1f;

    private void Awake()
    {
        actionController = ServiceLocator.Get<ActionController>();
        gridTransform = GetComponent<GridTransform>();
        gridTransform.Entrust(actionController.SurfaceManager, this);
    }

    private void OnDrawGizmos()
    {
        Vector3 center = new Vector3(Mathf.FloorToInt(transform.position.x) + 0.5f, Mathf.FloorToInt(transform.position.y) + 0.5f);
        Gizmos.DrawWireCube(center, Vector3.one);
    }
}
